<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="qnalist.do" name="qnalist" method="get">
	<table width="300" align="center" border="0" cellspacing="0" cellpadding="2">
			<tr>
				<td align="center">
					<select name="keyField">
						<option value="bq_title">제목</option>
						<option value="userid">사용자</option>
						<option value="bq_content">내용</option>
						<option value="st">답변상태</option>
						<option value="ct">카테고리</option>
						<option value="all">모두</option>
					</select>
				</td>
				<td>
					<input type="text" size="16" name="keyWord">
				</td>
				<td>
					<input type="submit" value="검색">
				</td>
			</tr>
		</table><br>
<!-- --------------------------------------------------------------------------------------- -->		
		<table width="80%" border="0">
			<tr bgcolor="#a3a3a3">
				<th>번 호</th><th>등록날짜</th> <th>카테고리</th><th>회원아이디</th><th>문의 제목</th><th>답변여부</th>
			</tr>
			<c:forEach var="article" items="${list}">
			<tr>
				<td align="center" width="10%">
						${number}
						<c:set var="number" value="${number-1}"/>   
				</td>
					<td>${article.bq_writeday}</td>
					<td>${article.bq_category}</td>
					<td>${article.userid}</td>
					<td><a href="qnadetail.do?bq_num=${article.bq_num}">${article.bq_title}</a></td>
					<td>${article.bq_status}</td>
			</tr>		
			</c:forEach>
<!-- --------------------------------------------------------------------------------------- -->					
			<c:if test="${count == 0 }">
				<tr align="center">
					<td colspan="6">등록된 댓글이 없습니다.</td>
				</tr>
			</c:if>
		</table>
		<br><br><br>
<div id=pageU align="center">${pagingHtml}</div>
</form>
</body>
</html>